-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enum #109
base: master
Are you sure you want to change the base?
Enum #109
Conversation
@scls19fr , Thanks for your contribution. I have some remarks, and they will be pointed on the diff lines. |
install: pip install -qq flake8 pytest pytest-cov tox | ||
install: | ||
- pip install -qq flake8 pytest pytest-cov tox | ||
- python setup.py install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this is necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it's necessary to install dependencies (enum34). So as enum34
is in dependencies of this package, installing package will install dependencies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, because you added enum34
to setup.py and to requirements.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moreover it's a way to ensure that this package installs correctly
@scls19fr, Ok, I will test (py2 and py3) your PR, if everything is ok, it might be merged. I'm not sure if imports like this will work on Python2.7: --- from grove import GrovePi
+++ from .grove import GrovePi I'v done some tests:
|
@scls19fr, A question, does you patch supports python3? I have found 3 problems:
PS: I don't think enum lead to a more elegant API... but ok. # Blink
import time
import pingo
# Now another import is needed...
+++from pingo import Mode
board = pingo.detect.get_board()
led = board.pins[13]
---led.mode = pingo.OUT
+++led.mode = Mode.OUT
while True:
led.toggle()
print(led.state)
time.sleep(.5) |
I don't think that there is Python 3 support for now see #100 |
Any news about this ? |
It should fix pingo-io#104 When led was on and user ask led to blink 3 times (for example), led shouldn't be switched off but should fallback to initial state (before blinking)
Changes Unknown when pulling c6bb567 on scls19fr:enum into * on pingo-io:master*. |
Try to fix #70
I don't have most boards so some tests are skipped maybe some tests are failing.